import React from 'react';
import classes from "./Confrim.module.css"
import Backdrop from '../BackDrop/BackDrop';

const confirm = (props) => {
    return (
        <Backdrop className={classes.ConfirmOuter}
                    onClick={props.onCancel}>
            <div className={classes.Confirm}>
                <p className={classes.ConfirmText}>确认清空购物车吗?</p>
                <div>
                    <button className={classes.cancel}
                            onCancel={(e)=>{props.onCancel(e)}}>取消</button>
                    <button className={classes.sure}
                            onClick={(e)=>{props.onClick(e)}}>确认</button>
                </div>
            </div>
        </Backdrop>
    );
};

export default confirm;